<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFilesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
        //文件列表
        Schema::create('files', function(Blueprint $table)
        {
            $table->increments('id')->comment('文件id');
            $table->string('file_url')->comment('文件地址');
            $table ->string('file_name')->nullable()->comment('文件名');
            $table ->string('file_ext')->nullable()->comment('文件扩展名');
            $table->string('file_type')->nullable()->comment('文件类型');
            $table->string('file_md5')->nullable()->comment('文件md5');
            $table->integer('file_size')->default(0)->comment('文件大小');
            $table->string('disk')->default('local')->comment('存储位置');
            $table->softDeletes();
            $table->timestamps();
        });
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
	}

}
